<?php

class ResourcePartition extends BaseModel 
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return CActiveRecord the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'resource_partition';
	}

    public function relations() 
    {
        return array(
            'physical'   =>  array(self::BELONGS_TO, 'ResourcePhysical', 'physical_id', 'joinType' => 'INNER JOIN'),
        );
    }
    
    public function attributeLabels()
    {
        return array(
            'partition_id' => '编号',
            'partition' => '分区',
            'size' => '大小',
            'count' => '行数',
            'create_time' => '生成时间',
            'schema' =>  '模式',
        );
    }
}
